package com.nerve.secondhandcar.service;

import java.util.List;

import com.nerve.secondhandcar.controller.model.CarCategoryModel;
import com.nerve.secondhandcar.controller.model.CarModel;
import com.nerve.secondhandcar.domain.Car;

/**
 * 平台中的汽车对象Service接口
 * @author 集成显卡
 * @version 2014-10-09 10:51:08
 */
public interface CarService {
	public static final String LEVEL_A = "A";
	public static final String LEVEL_B = "B";
	public static final String LEVEL_C = "C";
	public static final String LEVEL_D = "D";
	public static final String LEVEL_E = "E";
	
	/**
	 * 分界分数
	 */
	public static final int GRAGE_LIMIT = 60;
	
	public Car get(long id) throws Exception;
	
	public void add(CarModel model) throws Exception;
	
	/**
	 * 保存汽车的基本信息
	 * @method name: basicDo
	 * @return type: Car
	 *	@param model
	 *	@return
	 *	@throws Exception
	 */
	public Car basicDo(CarModel model) throws Exception;
	
	public void create(CarModel model)throws Exception;
	/**
	 * 删除实体
	 * @param model
	 * @throws Exception
	 */
	public void delete(CarModel model)throws Exception;
	
	/**
	 * 刷新实体
	 * @param model
	 * @throws Exception
	 */
	public void refresh(CarModel model)throws Exception;
	
	/**
	 * 浏览详情
	 * @param model
	 * @throws Exception
	 */
	public void view(CarModel model)throws Exception;
	
	/**
	 * 分页浏览
	 * @param model
	 * @throws Exception
	 */
	public void list(CarModel model)throws Exception;
	
	/**
	 * 判断实体是否存在
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public boolean isExist(CarModel model)throws Exception;

	/**
	 * 保存汽车配置信息
	 * @method name: configureDo
	 * @return type: void
	 *	@param model
	 *	@throws Exception
	 */
	public void configureDo(CarModel model) throws Exception;

	/**
	 * 批量删除
	 * @method name: delete
	 * @return type: void
	 *	@param ids
	 *	@throws Exception
	 */
	public void delete(Long[] ids) throws Exception;

	public void reportDo(CarModel model) throws Exception;

	/*
	 * =====================================================
	 * Start 汽车类型
	 * =====================================================
	 */
	public void categoryList(CarCategoryModel model)throws Exception;
	public void categorySave(CarCategoryModel model) throws Exception;
	public void categoryDelete(CarCategoryModel model)throws Exception;
	/*
	 * =====================================================
	 * END 汽车类型
	 * =====================================================
	 */

	public int specialPrice(CarModel model);

	public List categoryList();

	public int changeStatus(CarModel model);
}